
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22652
 * Date: 2024-04-27
 * Time: 12:00
 */
public class demo_2 {
    public static void main(String[] args) throws IOException {
        try(Reader reader=new FileReader("C:\\Users\\22652\\Desktop\\程序\\1.txt")){
            char[] chars=new char[1024];
            while (true){
                int tmp=reader.read(chars);
                if (tmp==-1){
                    break;
                }
                for (int i = 0; i < tmp; i++) {
                    System.out.print(chars[i]);
                }
            }
        }
    }
}
